package per.sunmes.lesrb.action;

import com.badlogic.gdx.scenes.scene2d.Action;

public class OriginAction extends Action {
	float originX, originY;
	int align;
	boolean isOriginAlign;

	public OriginAction(int originAlign) {
		align = originAlign;
		isOriginAlign = true;
	}

	public OriginAction(float ox, float oy) {
		originX = ox;
		originY = oy;
		isOriginAlign = false;
	}

	@Override
	public boolean act(float delta) {
		if (isOriginAlign) {
			target.setOrigin(align);
		} else {
			target.setOrigin(originX, originY);
		}
		return true;
	}

}
